<template>
<xy-page>
  <el-form label-width="144px" :model="detailData">
    <el-form-item label="名称">
      <el-col :span="12">
        <el-input v-model="detailData.name" :disabled="true"></el-input>
      </el-col>
    </el-form-item>
    <el-form-item label="描述">
      <el-col :span="12">
        <el-input type="textarea" v-model="detailData.description" rows="6" resize="none" :disabled="true"></el-input>
      </el-col>
    </el-form-item>
    <el-form-item label="CNAME域名(助教页)">
      <el-col :span="12">
        <el-input v-model="detailData.webappDomain" :disabled="true"></el-input>
      </el-col>
    </el-form-item>
    <el-form-item label="CNAME域名(观看页)">
      <el-col :span="12">
        <el-input v-model="detailData.watchDomain" :disabled="true"></el-input>
      </el-col>
    </el-form-item>
    <el-form-item label="创建时间">
      <el-col :span="12">
        <el-date-picker v-model="detailData.createTime" type="date" placeholder="请选择日期" :disabled="true" style="width: 100%;"></el-date-picker>
      </el-col>
    </el-form-item>
    <el-form-item label="状态">
      <el-col :span="12">
        <el-input v-show="detailData.status" :disabled="true" value="正常"></el-input>
        <el-input v-show="!detailData.status" :disabled="true" value="禁用"></el-input>
      </el-col>
    </el-form-item>
  </el-form>
</xy-page>
</template>
<script>
export default {
  data() {
    return {
      detailData: {}
    };
  },
  methods:{
    getData(){
      this.$postStream('/admin/instance/ccb/polyv/app/get.do', {
        data: {
          appId: this.devAppId
        },
        success: (res)=>{
          if(res.success){
            this.detailData = res.object
          }else{
            this.$message.error('基本信息获取失败')
          }
        },
        error:()=>{
          this.$message.error('基本信息获取失败')
        }
      })
    }
  },
  mounted(){
    this.devAppId = sessionStorage.getItem('curAccountAppId')
    this.getData()
  }
}
</script>
